package com.ruoyi.common.core.alone;

import java.io.Serializable;

public class LonelyData<T> implements Serializable {
    private static final long serialVersionUID = 1L;
    public int code;
    public T data;
    public String msg;


    public LonelyData<T> success(T oneItem) {
        LonelyData<T> item = new LonelyData<>();
        item.setData(oneItem);
        item.setCode(200);
        item.setMsg("success");
        return item;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
